<script setup lang="ts">
import { ContentWrap } from '@/components/ContentWrap'
import { useI18n } from '@/hooks/web/useI18n'
import { inject, nextTick, onMounted, reactive, ref } from 'vue'

import { ECOption } from 'types/echarts'

defineOptions({
  name: 'Menu4'
})
const axios = inject<any>('$axios')
const dialogVisible = ref(false)

const { t } = useI18n()

const text = ref('')

let valueV1 = ref('1.20')
let valueV2 = ref('1.01')

let valueAvg1 = ref('13:14')
let valueAvg2 = ref('15:04')

let valueBou1 = ref('43.13')
let valueBou2 = ref('65.86')

let valuePurchase1 = ref('4.26')
let valuePurchase2 = ref('2.56')

// 设置表格是否可见变量
let tableVisible = ref(false)
// let keyword = ref('联想')

// 数目不确定的竞争性关键词
// 其中有两个属性
// checked 多选框中是否被选中
// compkey 词值
// compnum 竞争度
let keywordCompKeyList = ref([])
const searchCompKeyBySeedword = async () => {
  console.log('searchCompKeyBySeedword')
  await axios
    .get('http://localhost:8080/compkeylab/comkey/getCompKeyBySeedword', {
      params: {
        seed_word: form.name
      }
    })
    .then((res: any) => {
      let data = res.data.data
      console.log(res)
      console.log(data)
      // 关键词
      // console.log(Object.keys(data[0])[0])
      // 竞争度
      // console.log(Object.values(data[0])[0])
      // 循环遍历 data 数组，并赋值到 keywordCompKeyList，其中 checked 属性默认 false
      data.forEach((item: any) => {
        console.log(Object.keys(item)[0])
        keywordCompKeyList.value.push({
          checked: false,
          compkey: Object.keys(item)[0],
          compnum: Object.values(item)[0]
        })
      })
    })
    .catch((err: any) => {
      console.log(err)
    })
}

const searchInterWordsBySeedword = async () => {
  console.log('searchInterWordsBySeedword')
  // 关闭弹窗
  tableVisible.value = false
  // 清空 tableData
  // 循环查
  let keywordCompKeyListTemp = []
  keywordCompKeyList.value.forEach((item: any) => {
    if (item.checked) {
      keywordCompKeyListTemp.push(item)
    }
  })
  // let tableDataTemp = []
  for (let i = 0; i < keywordCompKeyListTemp.length; i++) {
    let item = keywordCompKeyListTemp[i]
    await axios
      .get('http://localhost:8080/compkeylab/comkey/getInterWordsBySeedword', {
        params: {
          seed_word: item.compkey
        }
      })
      .then((res: any) => {
        console.log('item.compkey', item.compkey)
        let data = res.data.data
        // console.log(res)
        console.log('data', data)
        let ob = {
          competitor: Object.keys(data[0])[0],
          competitor1: Object.keys(data[1])[0],
          competitor2: Object.keys(data[2])[0],
          competitor3: Object.keys(data[3])[0],
          competitor4: Object.keys(data[4])[0],
          competitor5: Object.keys(data[5])[0],
          address: '点击跳转'
        }
        let nob = JSON.parse(JSON.stringify(ob))
        tableData.value.push(nob)
        console.log('tableData', tableData.value)
        // tableDataTemp.push(nob)
        // console.log('tableDataTemp', tableDataTemp)
      })
      .catch((err: any) => {
        console.log(err)
      })
  }
}

const form = reactive({
  name: '联想',
  region: '',
  date1: '',
  date2: '',
  delivery: false,
  type: [],
  resource: '',
  desc: ''
})

const formLabelWidth = '140px'

let echarts = inject<any>('$echarts')

let echartInitDiff = () => {
  let option
  option = {
    tooltip: {
      trigger: 'axis',
      axisPointer: {
        type: 'shadow'
      }
    },
    legend: {
      data: ['You', 'Your Competitor']
    },
    grid: {
      left: '3%',
      right: '4%',
      bottom: '3%',
      containLabel: true
    },
    xAxis: [
      {
        type: 'value'
      }
    ],
    yAxis: [
      {
        type: 'category',
        axisTick: {
          show: false
        },
        data: ['PCR(%)', 'Bounce Rate(%)', 'Avg.Visit Duration(min)', 'Visits(0.1B)']
      }
    ],
    series: [
      {
        name: 'Your Competitor',
        type: 'bar',
        stack: 'Total',
        label: {
          show: true
        },
        emphasis: {
          focus: 'series'
        },
        data: [2.56, 65.86, 15.04, 10.1]
      },
      {
        name: 'You',
        type: 'bar',
        stack: 'Total',
        label: {
          show: true,
          position: 'left'
        },
        emphasis: {
          focus: 'series'
        },
        data: [-4.26, -43.13, -13.14, -12.0]
      }
    ]
  }

  var myChart = echarts.init(document.getElementById('difference-charts'))
  myChart.setOption(option)
}

let echartInit = () => {
  let option: ECOption = {
    title: {
      text: 'Traffic Share',
      subtext: 'Fake Data',
      left: 'center'
    },
    tooltip: {
      trigger: 'item'
    },
    legend: {
      orient: 'vertical',
      left: 'left'
    },
    series: [
      {
        name: 'Access From',
        type: 'pie',
        radius: '50%',
        data: [
          { value: 50.6, name: 'Desktop' },
          { value: 68.2, name: 'Mobile' }
        ],
        emphasis: {
          itemStyle: {
            shadowBlur: 10,
            shadowOffsetX: 0,
            shadowColor: 'rgba(0, 0, 0, 0.5)'
          }
        }
      }
    ]
  }

  var myChart = echarts.init(document.getElementById('chart'))
  myChart.setOption(option)
}
let echartInit1 = () => {
  let option: ECOption = {
    title: {
      text: 'Traffic Sources',
      left: 'center'
    },
    tooltip: {
      trigger: 'axis'
    },
    // legend: {
    //   data: ['Email', 'Union Ads', 'Video Ads', 'Direct', 'Search Engine']
    // },
    grid: {
      left: '3%',
      right: '4%',
      bottom: '3%',
      containLabel: true
    },
    toolbox: {
      feature: {
        saveAsImage: {}
      }
    },
    xAxis: {
      type: 'category',
      boundaryGap: false,
      data: ['Apr 2023', 'May 2023', 'Jun 2023', 'Jul 2023', 'Aug  2023', 'Sep 2023', 'Oct 2023']
    },
    yAxis: {
      type: 'value'
    },
    series: [
      {
        name: '直接流量',
        type: 'line',
        data: [271, 246, 267, 241, 240, 262, 244]
      },
      {
        name: '转介流量',
        type: 'line',
        data: [36, 35, 40, 34, 36, 43, 36]
      },
      {
        name: '搜索流量',
        type: 'line',
        data: [111, 100, 105, 95, 99, 102, 99]
      },
      {
        name: '社交流量',
        type: 'line',
        data: [9.7, 6.9, 7.5, 7.9, 5.6, 5.9, 6.5]
      },
      {
        name: '付费流量',
        type: 'line',
        data: [0.67, 1.6, 2.1, 0.45, 2.1, 2.6, 1.7]
      }
    ]
  }

  var myChart1 = echarts.init(document.getElementById('chart1'))
  myChart1.setOption(option)
}
let echartInit2 = () => {
  let option: ECOption = {
    title: {
      text: 'Traffic Share',
      subtext: 'Fake Data',
      left: 'center'
    },
    tooltip: {
      trigger: 'item'
    },
    legend: {
      orient: 'vertical',
      left: 'left'
    },
    series: [
      {
        name: 'Access From',
        type: 'pie',
        radius: '50%',
        data: [
          { value: 25.8, name: 'Desktop' },
          { value: 35.4, name: 'Mobile' }
        ],
        emphasis: {
          itemStyle: {
            shadowBlur: 10,
            shadowOffsetX: 0,
            shadowColor: 'rgba(0, 0, 0, 0.5)'
          }
        }
      }
    ]
  }

  var myChart2 = echarts.init(document.getElementById('chart2'))
  myChart2.setOption(option)
}
let echartInit3 = () => {
  let option: ECOption = {
    title: {
      text: 'Traffic Sources',
      left: 'center'
    },
    tooltip: {
      trigger: 'axis'
    },
    // legend: {
    //   data: ['Email', 'Union Ads', 'Video Ads', 'Direct', 'Search Engine']
    // },
    grid: {
      left: '3%',
      right: '4%',
      bottom: '3%',
      containLabel: true
    },
    toolbox: {
      feature: {
        saveAsImage: {}
      }
    },
    xAxis: {
      type: 'category',
      boundaryGap: false,
      data: ['Apr 2023', 'May 2023', 'Jun 2023', 'Jul 2023', 'Aug  2023', 'Sep 2023', 'Oct 2023']
    },
    yAxis: {
      type: 'value'
    },
    series: [
      {
        name: '直接流量',
        type: 'line',
        data: [260, 222, 179, 161, 164, 205, 169]
      },
      {
        name: '转介流量',
        type: 'line',
        data: [13, 13, 13, 7.9, 7.2, 7.4, 8.2]
      },
      {
        name: '搜索流量',
        type: 'line',
        data: [45, 31, 24, 25, 28, 38, 27]
      },
      {
        name: '社交流量',
        type: 'line',
        data: [1.5, 0.86, 0.8, 1, 8.9, 8.37, 9.4]
      },
      {
        name: '付费流量',
        type: 'line',
        data: [0, 0.02, 0.014, 0, 0.017, 0.0017, 0.00129]
      }
    ]
  }

  var myChart3 = echarts.init(document.getElementById('chart3'))
  myChart3.setOption(option)
}
let sankeyInit = () => {
  let option: ECOption = {
    title: {
      text: 'Traffic Travel',
      left: 'center'
    },
    tooltip: {
      trigger: 'item'
    },
    legend: {
      orient: 'vertical',
      left: 'left'
    },
    series: {
      type: 'sankey',
      emphasis: {
        focus: 'adjacency'
      },
      data: [
        {
          name: 'amazon.com\n' + '↑8.92%\n' + '62.76%'
        },
        {
          name: 'Google organic ' + 'google.com\n' + '↑3.21%\n' + '0%\n' + '20.5%'
        },
        {
          name: 'duckduckgo.com\n' + '↑6.71%\n' + '1.6%'
        },
        {
          name: 'youtube.com\n' + '↑2.56%\n' + '0.93%'
        },
        {
          name: 'v2i8b.com\n' + '↑349.76%\n' + '0.87%'
        },
        {
          name: 'google.com\n' + '↑19.45%\n' + '26.14%'
        },
        {
          name: 'adp.com\n' + '↑47.8%\n' + '3.9%'
        },
        {
          name: 'ssl-images-amazon.com\n' + '↑7.05%\n' + '3.58%'
        },
        {
          name: 'media-amazon.com\n' + '↑21.42%\n' + '2.9%'
        },
        {
          name: 'youtube.com\n' + '↑26.04%\n' + '2.77%'
        },
        {
          name: 'lenovo.com'
        }
      ],
      links: [
        {
          source: 'amazon.com\n' + '↑8.92%\n' + '62.76%',
          target: 'lenovo.com',
          value: 10
        },
        {
          source: 'Google organic ' + 'google.com\n' + '↑3.21%\n' + '0%\n' + '20.5%',
          target: 'lenovo.com',
          value: 10
        },
        {
          source: 'duckduckgo.com\n' + '↑6.71%\n' + '1.6%',
          target: 'lenovo.com',
          value: 10
        },
        {
          source: 'youtube.com\n' + '↑2.56%\n' + '0.93%',
          target: 'lenovo.com',
          value: 10
        },
        {
          source: 'v2i8b.com\n' + '↑349.76%\n' + '0.87%',
          target: 'lenovo.com',
          value: 10
        },
        {
          source: 'lenovo.com',
          target: 'google.com\n' + '↑19.45%\n' + '26.14%',
          value: 10
        },
        {
          source: 'lenovo.com',
          target: 'adp.com\n' + '↑47.8%\n' + '3.9%',
          value: 10
        },
        {
          source: 'lenovo.com',
          target: 'ssl-images-amazon.com\n' + '↑7.05%\n' + '3.58%',
          value: 10
        },
        {
          source: 'lenovo.com',
          target: 'media-amazon.com\n' + '↑21.42%\n' + '2.9%',
          value: 10
        },
        {
          source: 'lenovo.com',
          target: 'youtube.com\n' + '↑26.04%\n' + '2.77%',
          value: 10
        }
      ]
    }
  }

  var myChart = echarts.init(document.getElementById('sankey'))
  myChart.setOption(option)
}
let sankeyInit2 = () => {
  let option: ECOption = {
    title: {
      text: 'Traffic Travel',
      left: 'center'
    },
    tooltip: {
      trigger: 'item'
    },
    legend: {
      orient: 'vertical',
      left: 'left'
    },
    series: {
      type: 'sankey',
      emphasis: {
        focus: 'adjacency'
      },
      data: [
        {
          name: 'openai.com\n' + '↑25.34%\n' + '81.65%'
        },
        {
          name: 'Google organic ' + 'google.com\n' + '↑38.74%\n' + '13.7%'
        },
        {
          name: 'google.com\n' + '↓7.75%\n' + '1.44%'
        },
        {
          name: 'bing.com\n' + '↑2.99%\n' + '0.34%'
        },
        {
          name: 'duckduckgo.com\n' + '↑17.46%\n' + '0.26%'
        },
        {
          name: 'google.com\n' + '↑9.59%\n' + '58.7%'
        },
        {
          name: 'youtube.com\n' + '↑17.8%\n' + '2.96%'
        },
        {
          name: 'facebook.com\n' + '↑19.68%\n' + '1.9%'
        },
        {
          name: 'aiprm.com\n' + '↑5.13%\n' + '1.19%'
        },
        {
          name: 'canva.com\n' + '↑19.35%\n' + '0.86%'
        },
        {
          name: 'asus.com'
        }
      ],
      links: [
        {
          source: 'openai.com\n' + '↑25.34%\n' + '81.65%',
          target: 'asus.com',
          value: 10
        },
        {
          source: 'Google organic ' + 'google.com\n' + '↑38.74%\n' + '13.7%',
          target: 'asus.com',
          value: 10
        },
        {
          source: 'google.com\n' + '↓7.75%\n' + '1.44%',
          target: 'asus.com',
          value: 10
        },
        {
          source: 'bing.com\n' + '↑2.99%\n' + '0.34%',
          target: 'asus.com',
          value: 10
        },
        {
          source: 'duckduckgo.com\n' + '↑17.46%\n' + '0.26%',
          target: 'asus.com',
          value: 10
        },
        {
          source: 'asus.com',
          target: 'google.com\n' + '↑9.59%\n' + '58.7%',
          value: 10
        },
        {
          source: 'asus.com',
          target: 'youtube.com\n' + '↑17.8%\n' + '2.96%',
          value: 10
        },
        {
          source: 'asus.com',
          target: 'facebook.com\n' + '↑19.68%\n' + '1.9%',
          value: 10
        },
        {
          source: 'asus.com',
          target: 'aiprm.com\n' + '↑5.13%\n' + '1.19%',
          value: 10
        },
        {
          source: 'asus.com',
          target: 'canva.com\n' + '↑19.35%\n' + '0.86%',
          value: 10
        }
      ]
    }
  }

  var myChart2 = echarts.init(document.getElementById('sankey2'))
  myChart2.setOption(option)
}

onMounted(() => {
  echartInit()
  echartInit1()
  sankeyInit()
  // echartInitDiff()
})
const clickMyBtn = () => {
  dialogVisible.value = true
  open()
}

let open = async () => {
  await nextTick()
  echartInit2()
  echartInit3()
  sankeyInit2()
  echartInitDiff()
}

let tableData = ref([
  {
    competitor: '华硕',
    competitor1: '笔记本',
    competitor2: '电脑',
    competitor3: '堡垒',
    competitor4: '飞行',
    competitor5: '设置',
    address: '点击跳转'
  }
])
</script>

<template>
  <ContentWrap :title="t('levelDemo.menu')">
    <div style="position: relative; height: 2000px; background: #f6f6f6">
      <!--      <div-->
      <!--        style="-->
      <!--          position: absolute;-->
      <!--          left: 20%;-->
      <!--          width: 55%;-->
      <!--          height: 7%;-->
      <!--          margin-top: 20px;-->
      <!--          background: white;-->
      <!--          border-radius: 15px;-->
      <!--        "-->
      <!--      >-->
      <!--        <div-->
      <!--          class="flex items-center"-->
      <!--          style="position: absolute; top: 50%; left: 15%; width: 70%; height: 5%"-->
      <!--        >-->
      <!--          <ElInput-->
      <!--            v-model="text"-->
      <!--            tpye="textarea"-->
      <!--            style="width: 75%; height: 50px"-->
      <!--            clearable-->
      <!--            autosize-->
      <!--            placeholder="请输入关键字"-->
      <!--          />-->
      <!--          <ElButton style="width: 80px; height: 50px; margin-left: 30px" type="primary"-->
      <!--            >搜索-->
      <!--          </ElButton>-->
      <!--        </div>-->
      <!--      </div>-->

      <div
        style="
          position: absolute;
          left: 20%;
          width: 55%;
          height: 10%;
          margin-top: 250px;
          background: white;
          border-radius: 15px;
        "
      >
        <ElRow :gutter="20" style="top: 20%; left: 10%; width: 80%">
          <ElCol :span="6">
            <div>
              <ElStatistic
                group-separator=","
                suffix="B"
                :precision="2"
                :value="valueV1"
                title="Visits"
                :value-style="{ fontWeight: 'bold', fontSize: '32px' }"
              />
            </div>
          </ElCol>
          <ElCol :span="6">
            <div>
              <ElStatistic
                title="Avg.Visit Duration"
                :value="valueAvg1"
                :value-style="{ fontWeight: 'bold', fontSize: '32px' }"
              />
            </div>
          </ElCol>
          <ElCol :span="6">
            <div>
              <ElStatistic
                group-separator=","
                :precision="2"
                suffix="%"
                decimal-separator="."
                :value="valueBou1"
                title="Bounce Rate"
                :value-style="{ fontWeight: 'bold', fontSize: '32px' }"
              />
            </div>
          </ElCol>
          <ElCol :span="6">
            <div>
              <ElStatistic
                group-separator=","
                :precision="2"
                suffix="%"
                decimal-separator="."
                :value="valuePurchase1"
                title="Purchase Conversion Rate"
                :value-style="{ fontWeight: 'bold', fontSize: '32px' }"
              />
            </div>
          </ElCol>
        </ElRow>
      </div>
      <div>
        <div
          style="
            position: absolute;
            left: 2.5%;
            display: flex;
            width: 95%;
            margin-top: 500px;
            background: white;
            border-radius: 15px;
          "
        >
          <div style="width: 60%">
            <div id="chart1" style="width: 100%; height: 400px; padding-top: 50px"></div>
          </div>
          <div style="width: 40%; padding-left: 20px">
            <div id="chart" style="width: 100%; height: 500px; padding-top: 50px"></div>
          </div>
        </div>
        <div
          style="
            position: absolute;
            left: 2.5%;
            display: flex;
            width: 95%;
            margin-top: 1000px;
            background: white;
            border-radius: 15px;
          "
        >
          <div style="width: 60%">
            <div
              id="sankey"
              style="width: 100%; height: 400px; padding-top: 50px; padding-left: 300px"
            ></div>
          </div>
        </div>
      </div>
      <div
        style="
          position: absolute;
          left: 2.5%;
          display: flex;
          width: 95%;
          height: 480px;
          margin-top: 1500px;
          background: white;
          border-radius: 15px;
        "
      >
        <div
          style="
            position: absolute;
            top: 5%;
            left: 0;
            width: 100%;
            height: 430px;
            background: white;
            border-radius: 15px;
          "
        >
          <ElText
            style="
              position: absolute;
              top: 5%;
              left: 45%;
              width: 90%;
              font-size: 24px;
              font-weight: bold;
            "
            >竞品分析结果
          </ElText>
          <el-button
            style="position: absolute; top: 5%; right: 10%"
            type="primary"
            @click="tableVisible = !tableVisible"
            >添加
          </el-button>
          <!--        关键词添加对话框-->
          <el-dialog v-model="tableVisible" title="">
            <el-form :model="form">
              <el-form-item label="关键词" :label-width="formLabelWidth">
                <el-input
                  v-model="form.name"
                  style="width: 300px"
                  autocomplete="off"
                  placeholder="请输入关键词"
                />
                <el-button
                  style="padding-right: 10px"
                  type="primary"
                  @click="searchCompKeyBySeedword()"
                  >搜索
                </el-button>
              </el-form-item>
              <el-form-item label="竞争词" :label-width="formLabelWidth">
                <el-checkbox
                  v-for="(item, index) in keywordCompKeyList"
                  :key="index"
                  v-model="item.checked"
                  :label="item.compkey + '(' + item.compnum + ')'"
                  size="large"
                />
                <!--                <el-checkbox v-model="checked1" label="Option 1" size="large" />-->
                <!--                <el-checkbox v-model="checked2" label="Option 2" size="large" />-->
              </el-form-item>
            </el-form>
            <template #footer>
              <span class="dialog-footer">
                <!--                <el-button @click="tableVisible = false">取消</el-button>-->
                <el-button type="primary" @click="searchInterWordsBySeedword()"> 确定 </el-button>
              </span>
            </template>
          </el-dialog>

          <ElTable
            :data="tableData"
            border
            stripe
            style="width: 90%; margin: auto; margin-top: 80px; border-radius: 15px"
            height="320"
            class="table-box"
          >
            <ElTableColumn label="序号" type="index" width="70" align="center" />
            <ElTableColumn
              index="1"
              prop="competitor"
              label="竞争对手"
              width="100"
              style="margin: auto"
            />
            <ElTableColumn prop="competitor1" label="最佳关键词1" width="150" />
            <ElTableColumn prop="competitor2" label="最佳关键词2" width="150" />
            <ElTableColumn prop="competitor3" label="最佳关键词3" width="150" />
            <ElTableColumn prop="competitor4" label="最佳关键词4" width="150" />
            <ElTableColumn prop="competitor5" label="最佳关键词5" width="150" />
            <ElTableColumn label="流量分析">
              <ElButton text type="primary" @click="clickMyBtn()">点击查看</ElButton>
            </ElTableColumn>
          </ElTable>
        </div>
      </div>
    </div>
    <div>
      <ElDialog
        v-model="dialogVisible"
        title="Tips"
        width="1000px"
        style="left: 100px; width: 1350px; height: 800px; overflow: auto"
      >
        <ElRow :gutter="20" style="top: 20%; left: 10%; width: 80%">
          <ElCol :span="6">
            <div>
              <ElStatistic
                group-separator=","
                suffix="B"
                :precision="2"
                :value="valueV2"
                title="Visits"
                :value-style="{ fontWeight: 'bold', fontSize: '32px' }"
              />
            </div>
          </ElCol>
          <ElCol :span="6">
            <div>
              <ElStatistic
                title="Avg.Visit Duration"
                :value="valueAvg2"
                :value-style="{ fontWeight: 'bold', fontSize: '32px' }"
              />
            </div>
          </ElCol>
          <ElCol :span="6">
            <div>
              <ElStatistic
                group-separator=","
                :precision="2"
                suffix="%"
                decimal-separator="."
                :value="valueBou2"
                title="Bounce Rate"
                :value-style="{ fontWeight: 'bold', fontSize: '32px' }"
              />
            </div>
          </ElCol>
          <ElCol :span="6">
            <div>
              <ElStatistic
                group-separator=","
                :precision="2"
                suffix="%"
                decimal-separator="."
                :value="valuePurchase2"
                title="Purchase Conversion Rate"
                :value-style="{ fontWeight: 'bold', fontSize: '32px' }"
              />
            </div>
          </ElCol>
        </ElRow>
        <div
          id="dialog"
          append-to-body
          style="
            position: absolute;
            left: 2.5%;
            display: flex;
            width: 95%;
            background: white;
            border-radius: 15px;
            overflow-wrap: revert;
          "
        >
          <div style="width: 60%">
            <div id="chart3" style="width: 100%; height: 400px; padding-top: 50px"></div>
          </div>
          <div style="width: 40%; padding-left: 20px">
            <div id="chart2" style="width: 100%; height: 500px; padding-top: 50px"></div>
          </div>
        </div>
        <div style="width: 40%; padding-left: 20px">
          <div
            id="sankey2"
            style="width: 100%; height: 500px; padding-top: 500px; padding-left: 350px"
          ></div>
        </div>
        <div style="width: 40%; padding-left: 20px">
          <div
            id="difference-charts"
            style="width: 100%; height: 500px; padding-top: 500px; padding-left: 350px"
          ></div>
        </div>

        <template #footer>
          <span class="dialog-footer"></span>
        </template>
      </ElDialog>
    </div>
  </ContentWrap>
</template>

<style>
.like {
  cursor: pointer;
  font-size: 25px;
  display: inline-block;
}

.dialog-footer button:first-child {
  margin-right: 10px;
}

#visits {
  font-weight: bold;
}

.el-button--text {
  margin-right: 15px;
}

.el-select {
  width: 300px;
}

.el-input {
  width: 300px;
}

.dialog-footer button:first-child {
  margin-right: 10px;
}
</style>
